var swiper = new Swiper(".mySwiper", {
            loop: true,
            spaceBetween: 30,
            centeredSlides: true,
            autoplay: {
                delay: 2000,
                disableOnInteraction: false,
            },
            pagination: {
                el: ".swiper-pagination",
                clickable: true,
            },
            navigation: {
                nextEl: ".swiper-button-next",
                prevEl: ".swiper-button-prev",
            },
        });
        $('.swiper').addEventListener('mouseover', function () {
            swiper.autoplay.stop()
        })
        $('.swiper').addEventListener('mouseout', function () {
            swiper.autoplay.start()
        })
        let pathname = '';
$a('.box7 li').forEach(function(a) {
    a.addEventListener('mouseover',function(){
        a.style.backgroundColor = 'deepskyblue'

        let path = a.children[0].src;
        let index1 = path.lastIndexOf('/')
        let index2 = path.lastIndexOf('.')
        pathname = path.slice(index1+1,index2)
        console.log(pathname);
        a.children[0].src = `../../assets/images/${pathname}-c.svg`
        
    })
     a.addEventListener('mouseout',function(){
        a.style.backgroundColor = '';
         a.children[0].src = `../../assets/images/${pathname}.svg`
         console.log(a.children[0].src);
         
    })
});
 var mySwiper1 = new Swiper('.swiper1', {
            autoplay: {
                delay: 2000,
                disableOnInteraction: false,
            },
            loop: true,
            effect: "fade",
        })
 function toTOP() {
            console.log(1);

            window.scrollTo({
                top: 0,
                left: 0,
                behavior: "smooth"
            })

        }
        window.addEventListener("scroll", function () {
            // console.log(1);
            let but = document.querySelector('.but');
            if (window.scrollY > 100) {
                but.style.display = 'block'
            } else {
                but.style.display = 'none'
            }

        })        